package com.sheshu.user.service.impl;

import java.util.List;
import com.sheshu.common.utils.DateUtils;
import com.sheshu.user.domain.HeatResidentUsers;
import com.sheshu.user.mapper.HeatResidentUsersMapper;
import com.sheshu.user.service.IHeatResidentUsersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import jakarta.annotation.Resource;

/**
 * 用热用户信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-01-07
 */
@Service
public class HeatResidentUsersServiceImpl implements IHeatResidentUsersService
{
    @Resource
    private HeatResidentUsersMapper heatResidentUsersMapper;

    /**
     * 查询用热用户信息
     * 
     * @param id 用热用户信息主键
     * @return 用热用户信息
     */
    @Override
    public HeatResidentUsers selectHeatResidentUsersById(Long id)
    {
        return heatResidentUsersMapper.selectHeatResidentUsersById(id);
    }

    /**
     * 查询用热用户信息列表
     * 
     * @param heatResidentUsers 用热用户信息
     * @return 用热用户信息
     */
    @Override
    public List<HeatResidentUsers> selectHeatResidentUsersList(HeatResidentUsers heatResidentUsers)
    {
        return heatResidentUsersMapper.selectHeatResidentUsersList(heatResidentUsers);
    }

    /**
     * 新增用热用户信息
     * 
     * @param heatResidentUsers 用热用户信息
     * @return 结果
     */
    @Override
    public int insertHeatResidentUsers(HeatResidentUsers heatResidentUsers)
    {
        heatResidentUsers.setCreateTime(DateUtils.getNowDate());
        return heatResidentUsersMapper.insertHeatResidentUsers(heatResidentUsers);
    }

    /**
     * 修改用热用户信息
     * 
     * @param heatResidentUsers 用热用户信息
     * @return 结果
     */
    @Override
    public int updateHeatResidentUsers(HeatResidentUsers heatResidentUsers)
    {
        heatResidentUsers.setUpdateTime(DateUtils.getNowDate());
        return heatResidentUsersMapper.updateHeatResidentUsers(heatResidentUsers);
    }

    /**
     * 批量删除用热用户信息
     * 
     * @param ids 需要删除的用热用户信息主键
     * @return 结果
     */
    @Override
    public int deleteHeatResidentUsersByIds(Long[] ids)
    {
        return heatResidentUsersMapper.deleteHeatResidentUsersByIds(ids);
    }

    /**
     * 删除用热用户信息信息
     * 
     * @param id 用热用户信息主键
     * @return 结果
     */
    @Override
    public int deleteHeatResidentUsersById(Long id)
    {
        return heatResidentUsersMapper.deleteHeatResidentUsersById(id);
    }
}
